<?php
declare(strict_types=1);

namespace App\Logic\User\Service\Article;

use App\Logic\User\Repository\Article\ArticleCateRepository;
use App\Logic\User\Service\UserServiceInterface;

class ArticleCateService implements UserServiceInterface
{

    public static function searchWhere(array $requestParams)
    {
        return function ($query) use ($requestParams) {
            $query->where("is_show", "=", 1);
        };
    }

    public function serviceAllSelect(array $requestParams): array
    {
        return (new ArticleCateRepository())->repositoryAllSelect(self::searchWhere($requestParams), ["uid", "title"]);
    }

    public function serviceSelect(array $requestParams): array
    {
        return [];
    }

    public function serviceCreate(array $requestParams): array
    {
        return [];
    }

    public function serviceUpdate(array $requestParams): array
    {
        return [];
    }

    public function serviceDelete(array $requestParams): int
    {
        return 0;
    }

    public function serviceFind(array $requestParams): array
    {
        return [];
    }
}
